import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopOrderActionController } from '../../../controllers';
const uctoominishopOrderActionRouter = new Router();
const minishopOrderActionController = new uctooMinishopOrderActionController();

uctoominishopOrderActionRouter.post('/add', requireUser, minishopOrderActionController.add);
uctoominishopOrderActionRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_order_action'), minishopOrderActionController.edit);
uctoominishopOrderActionRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_order_action'), minishopOrderActionController.delete);

//For getting minishopOrderAction with permission control
uctoominishopOrderActionRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_order_action'), minishopOrderActionController.getSingle);
uctoominishopOrderActionRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_order_action'), minishopOrderActionController.getMany);
uctoominishopOrderActionRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_order_action'), minishopOrderActionController.getMany);

//#endregion AutoCreateCode
export default uctoominishopOrderActionRouter;
